package com.itgungnir.designpattern.decorator;

public class Test {
	public static void main(String[] args) {
		// 一杯低咖啡因咖啡
		Beverage beverage1 = new Espresso();
		System.out.println(beverage1.getDescription() + " = " + beverage1.getCost());
		// 一杯浓缩咖啡，加两份摩卡
		Beverage beverage2 = new Decaf();
		beverage2 = new Mocha(beverage2);
		beverage2 = new Mocha(beverage2);
		System.out.println(beverage2.getDescription() + " = " + beverage2.getCost());
		// 一杯综合咖啡，加一份牛奶和一份摩卡
		Beverage beverage3 = new HouseBlend();
		beverage3 = new Milk(beverage3);
		beverage3 = new Mocha(beverage3);
		System.out.println(beverage3.getDescription() + " = " + beverage3.getCost());
	}
}